﻿using BehaviorModel.Block;
using BehaviorModel.Block.Summator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace BehaviorModel.XmlSerializer
{
    /// <summary>
    /// Class for Xml Serialization of Summator Block
    /// </summary>
    public class SummatorXmlSerializer : IXmlSerializer
    {
        /// <summary>
        /// Serializes Summator to XElement
        /// </summary>
        /// <returns></returns>
        public XElement ToXElement(IBlock block)
        {
            return new XElement(XmlSerializationConstants.SUMMATOR_BLOCK, null);
        }

        /// <summary>
        /// Deserializes XElement to Summator
        /// </summary>
        /// <param name="element"></param>
        /// <returns></returns>
        public IBlock FromXElement(XElement element)
        {
            return new Summator();
        }
    }
}
